/*
using MyGeneration/Template/NHibernate (c) by lujan99@usa.net
*/
using System;
using System.Collections;
using System.Collections.Generic;

namespace Rodunu.Movies.Contracts
{
	/// <summary>
	/// FriendMovieRequest object for NHibernate mapped table 'FriendMovieRequest'.
	/// </summary>
	[Serializable]
    public class FriendMovieRequest : IIdentifier
	{
		#region Member Variables
		protected long _id;
		protected UserMovies _usermovies;
		protected UserInfo _userinfo;
		protected DateTime _requestdate;
		protected DateTime? _approvedate;
		protected bool? _approved;
		protected DateTime? _returndate;
		#endregion
		#region Constructors
			
		public FriendMovieRequest() {}
					
		public FriendMovieRequest(UserMovies usermovies, UserInfo userinfo, DateTime requestdate, DateTime? approvedate, bool? approved, DateTime returndate) 
		{
			this._usermovies= usermovies;
			this._userinfo= userinfo;
			this._requestdate= requestdate;
			this._approvedate= approvedate;
			this._approved= approved;
			this._returndate= returndate;
		}

		public FriendMovieRequest(UserMovies usermovies, UserInfo userinfo, DateTime requestdate, DateTime returndate)
		{
			this._usermovies= usermovies;
			this._userinfo= userinfo;
			this._requestdate= requestdate;
			this._returndate= returndate;
		}
		
		#endregion
		#region Public Properties
		public  virtual long Id
		{
			get { return _id; }
			set {_id= value; }
		}
		public  virtual UserMovies UserMovies
		{
			get { return _usermovies; }
			set {_usermovies= value; }
		}
		public  virtual UserInfo UserInfo
		{
			get { return _userinfo; }
			set {_userinfo= value; }
		}
		public  virtual DateTime RequestDate
		{
			get { return _requestdate; }
			set {_requestdate= value; }
		}
		public  virtual DateTime? ApproveDate
		{
			get { return _approvedate; }
			set {_approvedate= value; }
		}
		public  virtual bool? Approved
		{
			get { return _approved; }
			set {_approved= value; }
		}
		public  virtual DateTime? ReturnDate
		{
			get { return _returndate; }
			set {_returndate= value; }
		}
		#endregion
		
		#region Equals And HashCode Overrides
		/// <summary>
		/// local implementation of Equals based on unique value members
		/// </summary>
		public override bool Equals( object obj )
		{
			if( this == obj ) return true;
			if( ( obj == null ) || ( obj.GetType() != this.GetType() ) ) return false;
			FriendMovieRequest castObj = (FriendMovieRequest)obj;
			return ( castObj != null ) &&
			this._id == castObj.Id;
		}
		/// <summary>
		/// local implementation of GetHashCode based on unique value members
		/// </summary>
		public override int GetHashCode()
		{
			int hash = 57;
			hash = 27 * hash * _id.GetHashCode();
			return hash;
		}
		#endregion
		
	}
}
